package com.xwb.service.impl;

import com.xwb.dao.WorkDao;
import com.xwb.domain.Work;
import com.xwb.service.WorkService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class WorkServiceImpl implements WorkService {
    @Autowired
    private WorkDao workDao;

    @Override
    public boolean saveWork(Work work) {
        workDao.save(work);
        return true;
    }

    @Override
    public List<Work> showAllWorkByCompetition(String competitionId) {
        return workDao.showAllWorkByCompetitionId(competitionId);
    }

    @Override
    public List<Work> showAllWork() {
        return workDao.showAllWork();
    }

    @Override
    public List<Work> showFinalist() {
        return workDao.showFinalist();
    }

    @Override
    public boolean selectFinaList(Integer enteringRank) {
        workDao.updateFinaList(enteringRank);
        return true;
    }





}
